json traversal in js
Object.entries(jsonObj).forEach(([key, value]) => {
// do something with key and val
});
json traversal in js
Object.entries(jsonObj).forEach(([key, value]) => {
// do something with key and val
});
json traversal in js
function traverse(jsonObj) {
if( jsonObj !== null && typeof jsonObj == "object" ) {
Object.entries(jsonObj).forEach(([key, value]) => {
// key is either an array index or object key
traverse(value);
});
}
else {
// jsonObj is a number or string
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us