IBM Security Resilient

Expand all | Collapse all

Want to extract the nested JSON

  • 1.  Want to extract the nested JSON

    Posted Mon February 24, 2020 12:03 AM
    hi,

    I am facing the problem while getting the value from nested json

    {"success":true,"error":null,"data":{"token":"81F1086ECAC394A8A5BE689B200D0A24FCB22F596DF42AB42B1153B2E5C5E65FE5B5B5C3F0922326BF2C003E26739C7F9749A711417C79D3E96987F958FE2843BCBC18C5A7DFF6EB958F7B0D62CFB7BA4256D954C4925938DB125C8FB99E344176CFD331845B9D07D5178AD4810D79AA41652B043CBB144A983459950F524BB0BBD72863D36330F7B8C79454AA983648B897EBE6BDC71D768539CB124BE30EABC7539D567E7758C8C455A0559D6D9C51.2020-02-24%2004%3A43%3A34Z.3e7923d457499f06e3223feadd188dfa27217133"}}

    I want to extract the token using results.data.token but its giving me error, any thoughts.

    Best Regards,
    Zeeshan Ahmad.

    ------------------------------
    Zeeshan Ahmad
    ------------------------------


  • 2.  RE: Want to extract the nested JSON

    Posted Mon February 24, 2020 01:28 PM
    What's the error?

    Try these they should do the same thing though):
    results['data']['token']
    results.data['token']

    ------------------------------
    Jared Fagel
    Cyber Security Analyst I
    Public Utility
    ------------------------------