JSON is a text-based data format following JavaScript object syntax, which was popularized by Douglas Crockford. Even though it closely resembles JavaScript object literal syntax, it can be used independently from JavaScript, and many programming environments feature the ability to read (parse) and generate JSON.
Click the Add button and select Column. On the Column element, specify values for the Index and Value attributes. Click the Add button in the sub-menu and select Add Same. Repeat the last two steps to add additional columns and elements from the JSON file.
I have a JSON file with content
{"name" : "Conrad", "info" : "tst", "children" : [
{"name" : "Rick" },
{"name" : "Lynn" },
{"name" : "John", "children": [
{"name" : "Dave", "children": [
{"name" : "Dave" },
{"name" : "Chris" }
]},
{"name" : "Chris" }
]}
]};
I want to import this JSON file data inside a JavaScript file and have the final result like
var treeData ={"name" : "Conrad", "info" : "tst", "children" : [
{"name" : "Rick" },
{"name" : "Lynn" },
{"name" : "John", "children": [
{"name" : "Dave", "children": [
{"name" : "Dave" },
{"name" : "Chris" }
] },
{"name" : "Chris" }
]}
]};
I've tried many code samples but none have worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With