You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Below is the sample of the JSON. I want to get the id and workspaceId with the given value of jirakey using SIL.
In this given JSON, how to get id and workspaceId with "jirakey=MD" ?
--------------------------------------------------
{
"success": true,
"message": null,
"data": [
{
"id": "AAAAAAAAAAAAAAA",
"workspaceId": "BBBBBBBBBBBBBBBB",
"name": "name01",
"description": null,
"jiraKey": "MD",
"platform": "Jira",
"workspaceName": "workspace1"
},
{
"id": "CCCCCCCCCCCCCCCCCC",
"workspaceId": "dddddddddddddddd",
"name": "name02",
"description": "mydescription",
"jiraKey": null,
"platform": "Local",
"workspaceName": "workspace2"
}
]
}
---------------------------------------------------
In JMeter, there's way as following:
$.data[?(@.jiraKey=="MD")].id
$.data[?(@.jiraKey=="MD")].workspaceId
How about in SIL?
you should use fromJson to get the json like an object and then you should get the property like it showed in this documentation page.
Just a thing about your json: there is an issue due to the comma near "workspace1" and near "workspace2".
I recommend you to use a Json validator like: JSONLint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Andrea Pannitti for pointing it out. I corrected the json.
This was because I removed part of the content in the original json.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.