Hope you have been a good day. I want to ask you a question. Here is it:
So I have an object and I get values from it with Underscore.js (I will give you an example without using underscore.js to getting values).
After I get values, it puts numbers that are bigger than 0. I think it sorts bigger than smaller.
I want values exactly how they are at the object before I take them.
Here is an image for you
Here is the code
tmpReport.forEach(element => {
const tmpVal = [];
console.log("element: ", element);
tmpValList.push(_.values(element));
console.log('tmpValList: ', tmpValList);
});
Here is the code without using underscore.js:
tmpReport.forEach(element => {
const tmpVal = [];
console.log("element: ", element);
Object.entries(element).forEach(([key, value]) => {
tmpVal.push(value);
});
tmpValList.push(tmpVal);
console.log('tmpValList: ', tmpValList);
});
So any help will be appreciated. Thank you!