loop through nested json object typescript
var catalog =
{
"products": [
{
"name": "prod 1",
"versions": [
"ver 1",
"ver 2"
]
},
{
"name": "prod 2",
"versions": [
"ver 1",
"ver 2"
]
}
]
};
for(var i = 0; i < catalog.products.length; i++)
{
var product = catalog.products[i];
var productName = product.name;
for(var j = 0; j < product.versions.length; j++)
{
var version = product.versions[j];
}
}
Also in JavaScript:
- array from js
- javascript for loop return index
- send random memes discord.js
- how to append data to a field in mongoose model
- hoisting in javascript
- store the text from a form jquery
- vuejs components props pass array
- angular stable version
- react native margin vs padding
- prepend to array javascript
- discord js check every x minutes
- jquery wysiwyg editor val acf
- sum in javascript
- get the current date time in javascript in 12 hour format
- how to run an express app
- create 5 car object using a constructor function in javascript
- puppeteer stealth popup
- json_extract in non native query
- react link underline
- create new vuejs project
- check multiple ifield if it's blank in jquery
- google login with react native
- js script
- find label jquery