i have saved search result as below {"values": "GR...
# suitescript
v
i have saved search result as below {"values": "GROUP(account)":[{"value":"1789","text":"580000"}], "SUM(amount)":"8.622", "GROUP(line.cseg_cmb_bal_div)":[{"value":"1","text":"Holding"}], "GROUP(departmentnohierarchy)":"- None -", "GROUP(classnohierarchy)":"- None -", "GROUP(location)":[{"value":"","text":"- None -"}], "MAX(formulatext)":"d", "MAX(formulatext)_1":"Partially Matched", "MAX(formuladatetime)":"18/4/2023 14:34", "MAX(formulatext)_2":"", "GROUP(type)":[{"value":"Journal","text":"Journal"}], "GROUP(internalid)":[{"value":"191086","text":"191086"}], "GROUP(line)":"1"}} I want to take the value of "MAX(formulatext)":"d", but it shows error. Could anyone please help me
s
what is the error? without knowing that, it hard to know what is wrong, as the above looks like a typical JSON from a summary saved search.
v
yes
Cannot call method "MAX" of undefined
m
Assuming that object is in a variable called
data
, you would access that value with:
data.values['MAX(formulatext)']
v
it still says Cannot read property "MAX(formulatext)" from undefined
Thank you i got it