Skip to content

Tag: javascript

Show JSON data in table in selectbox

There is a JSON data and I have displayed each key value as a column in the table. I want to export data from JSON to each column as a selectbox. i.e. I want to show all corresponding values ​​of “country” in JSON as selectbox in COUNTRY column. My JSON data My Javascript How can i edit? Answer Do…

Match two arrays with same id

How to push name from array1 to array2 with matching ids end result Answer Here’s how I’d do it: i.e. create an object out of one of the arrays, using the id as the key. Then you can map over the 2nd one and use the ‘index’ to quickly look up elements in the first one.