0

//I write a code of a json file in visual studio code....

let coll={  
    "collName" : "pu_vendor", 
    "collDesc" : "Vendor Master", 
    "formName" : "syscollection", 
    "formType" : "CRUD", 
    "docLevel" : [
        {
            "level" : 0, 
            "levelName" : "root", 
            "levelDesc" : "Vendor Description", 
            "parent" : "", 
            "comments" : "", 
            "fields" : [
                {
                    "fieldName" : "vndrId", 
                    "fieldDesc" : "Vendor ID", 
                    "dataType" : "S", 
                    "size" : 5, 
                    "comments" : ""
                }
            ]
        }
    ]
} 

i want to print all values with all keys type of key:value pattern....So i easily print with console.log

console.log(coll);

it shows truely all value by key:value pattern also but when it is comes on the next "fields" key, it prints only the type of this key i.e [Array], it do not show the keys and values of this key

  • You can check: https://stackoverflow.com/a/4293047/9041712 – Yu-Lin Chen Dec 08 '17 at 07:25
  • `console.log(JSON.stringify(coll));` You are basically printing the original object. `Map` has done nothing to it. – gurvinder372 Dec 08 '17 at 07:26
  • 1
    Possible duplicate of [How to read an external local JSON file in Javascript](https://stackoverflow.com/questions/19706046/how-to-read-an-external-local-json-file-in-javascript) – F0XS Dec 08 '17 at 07:26

0 Answers0