Quantcast
Channel: SCN : Popular Discussions - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 1411

Problem with instantiating JSON object in script

$
0
0

Hi All,

 

I am having difficulty in DS 1.5 (P0 and P1) using JSON as a datatype for a variable in script.

 

The Application Designer Guide lists JSON in the Expression type system section, and also provides a reference to it in the example under the JSON listing in the API Reference. The example provided in the document is as follows:

 

var result = "";

var sample = {"key1": 100, "key2": 200};

  1. sample.forEach(function(value, key) {

result = result + "Key: " + key + " Value: " + value;

});

 

Whenever I try to use it in script I get a red cross which tells me "You cannot instantiate a JSON object". This prevents me from operating on the object in subsequent code.

 

Can anyone help me with where I am going wrong?

 

Thanks, Pat


Viewing all articles
Browse latest Browse all 1411

Trending Articles



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