We can access the data by first deserializing this string using deserialize json activity and say the output is in variable jobj which is a jobject type variable
Jobj("Creds")("username").ToString for username and replace it with password to retrieve the password
Thank you @Anil_G for your response, really appriciate it. I tried doing what you suggested, but the output of Deserialze JSON im getting datatype as “Object” not jobject. Could you please guide me as to where am I going wrong.
Thank you so much @Anil_G for your time and help, the code you suggested worked amazingly well , but a just have 1 question, what if I have an array of credentials, please find the attached notepad file/ Image for reference Credentials - Copy.json (242 Bytes)
So using the name I want to fetch the particular credentials.
Could you please tell me how to fetch credentials from an Array of credentials using the name?
Jobj("Credentials")(0)("name").ToString will give the first one
Like that change 0 to 1 etc to get each
You can as well use another deserialize on jobj("Credentials").ToString and type argument as Jarray and then use for loop to get each credential in the loop currentitem("name").ToString
Thank you so much @Anil_G. Both the solutions you suggested worked pretty well. This concept is new to me so thank you for helping me out Hope you have a wonderful day.