0

I am new to nodejs, I have an object of enumerable objects which has data like below:

const obj = {
    "id3" : {
       "userName":"name3",
       "age":"age3"
    },
    "id2" : {
       "userName":"name2",
       "age":"age2"
    },
    "id1" : {
       "userName":"name1",
       "age":"age1"
    },
    ...
}

when I want to dump this object to a file using writeJSON method of fs-extra, Is the order maintained? i.e., when I am reading it by readJSON method will I get the object in the same order?

0 Answers0