Answer the question
In order to leave comments, you need to log in
How to write a JSON viewer web application in JS?
Haven't worked with JSON before and am just learning JS. You need to write an application for viewing JSON files in this form:
How to write similar web applications and what would you advise to use for implementation? It is necessary for JS
Answer the question
In order to leave comments, you need to log in
1. Create an empty array op type:
const InfoArr = [{keyName: "shopperEmail", valueType: 'array'}]
const jsonObj = JSON.parse( yourJson )
const keysArr = Object.keys(jsonObj)
keyArr.forEach(key => infoArr.push({keyName: key, valueType: typeof jsonObj[key]}))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question