Let's say I have an array like this
var myarray=[{"id":1234, "listtext":open, "prop3":value3 ,"prop4": value4},
{"id":1235, "listtext":open, "prop3":value3 ,"prop4": value4},
{"id":1236, "listtext":open, "prop3":value3 ,"prop4": value4},
{"id":1237, "listtext":open, "prop3":value3 ,"prop4": value4}];
but I want to convert it to an object like this:
{1234:open,1235:close, 1236: pending,1237:awaiting response}
Can this be done? all the methods I have tried keep getting only the last key value pair.