Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Problem with instantiating JSON object in script

$
0
0

Hi Patrick,

 

in standard this code can help you.

you can define an array, but you cannot put an object into the array - means you need 2 arrays.

 

var names = ["a", "b", "c"];

var values = [23, 34, 36];

 

 

names.forEach(function(elementName, indexName) {

  values.forEach(function(elementValue, indexValue) {

  if(indexName == indexValue) {

  APPLICATION.createInfoMessage("name: " + elementName + ", value: " + elementValue);

  }

  });

});

 

how do you want to use it actually?

 

Karol


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>