0

I have a obj -> JSON.stringify().

newString = '<pre>'+JSON.stringify(values, ['displayName'], 4)+'</pre>';

returns: enter image description here

I only want to show the values for the key "displayName" without any of the array/obj markyp("{}, [], etc") ---> Alexander Thorarinsson

Example of obj depths in 'values' array:

enter image description here

Log for every cell value for the given table render: enter image description here

Al Ex Tsm
  • 2,042
  • 2
  • 29
  • 47

1 Answers1

2

You don't need stirngify, but you do need to unwrap the arrays carefully

newString = '<pre>'+values[0].displayName[0]+'</pre>';
Simon H
  • 20,332
  • 14
  • 71
  • 128