AnsweredAssumed Answered

Unable to extract the keys from JavaScript object

Question asked by naisa13 Employee on Feb 9, 2015
Latest reply on Feb 26, 2015 by Douglas Lima

I'm using PAM 4.2.2 version.

 

Below is the javascript i'm execution using Run Java Script Operator

_____________________________________________________________________

var obj ={   "key1": "value1",  "key2": "value2",  "key3": "value3","key4": "value4" }

Process.objType = typeof obj

Process.keys1 = []

for (var key in obj)

{

  if (obj.hasOwnProperty(key))

  Process.keys1.push(key)

}

____________________________________________________________________

for the above code array Process.keys1 is getting appended with keys 'key1','keys2' ... when created the object manually.

 

In other case, the same object is being created by SRF,

 

With same code the keys are not getting populated to keys1 array.

 

I've attached the StartReqestForm and Process.

Can any one suggest what should i do to get the keys from the object.??

Outcomes