Layer7 API Management

  • 1.  Extract JSON Keys and Values

    Posted Jul 24, 2016 11:38 PM

    Hi everyone ,

     

    Is there any way to extract the JSON keys alone. I read few posts in community but most of them were about extracting json key's values.

    I can extract the values using evaluate json path expression but I need the keys as well.

     

    For example , my json object looks like

     

    {"q1":"a1","q2":"a2","q3":"a3","q4":"a4","q5":"a5","q6":"a6","q7":"a7","q9":"a9","q10":"a10","q12External":"a11","q13":"234","q14":"a14","q15":"2","q16":"2","q17":"2","q18":"2"}

     

    I am able to get a1,a2,a3 etc..but I need q1,q2,q4 etc.

     

    Geethu



  • 2.  Re: Extract JSON Keys and Values
    Best Answer

    Posted Jul 25, 2016 02:51 AM

    You should already know the key so gonna need more detail on this.

     

    Another option you can look at is trying to do a regex.



  • 3.  Re: Extract JSON Keys and Values

    Posted Aug 04, 2016 11:55 PM

    Is there a way to output all the JSON values in one shot?

     

    Geethu