There is an object below:
var obj = {“2017-12-13”: {“prop 1”: “value1”, “prop 2”: “value2”}, “2017-12-14”: {“prop 1”: “item1”, “prop 2”: “item2”}};
var arr = Object.values(obj); // Result: [{prop 1: “value1”, prop 2: “value2”}, {prop 1: “item1”, prop 2: “item2”}]
The result is incorrect because there are no " " around prop 1 and prop 2. That’s why I’m not able to get values. Do you know how to solve this problem?
How can I get values of prop 1 in a new array? (the desired result: var myArr = [value1, item1])