0
我有這個哈希的誤差值提取哈希
obj= {"User"=>["user_error", "Jack", "Jill1"], "Project"=>[ "project_error", "xxx"], "Task"=>[39], "Date"=>"date_error", "Time (Hours)"=>["time_error", "-2"], "Comment"=>"comment_error"}
我要提取鍵的誤差值,並將其存儲其他地方 .The最終結果應該是
error = ["user_error", "project_error","date_error","time_error","comment_error"]
obj = {"User"=>["Jack", "Jill1"], "Project"=>[ "xxx"], "Task"=>[39], "Date"=>nil, "Time (Hours)"=>["-2"], "Comment"=>nil}
有人可以幫助如何做到這一點?
你有什麼迄今所做?告訴我們你的代碼。 –