Put a Json in a variable ?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Put a Json in a variable ?
Hi all,
In my keywordTest, I send au request with a json body.
I would like stock this json in a variable because I need to work with it ( retrieve data & modify je the json )
Is it possible ?
Thank you so much for helping
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's an example,
using JSON to construct the string and to parse
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, thanks for your helping.
How I can modify a value in my json ?
I need to increment 'numeroPrestation' in my json each time the test has to run
I try to retrieve it and put in a variable but I can't put this variable in my json
Thanks in advance !
Ana
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the example I have shown, I have an object declared as
myjson = {
title: "SmartBear",
body: "TestComplete",
userid: 1
}
I can modify the value like so,
myjson.body = "TestExecute"
and then convert to json, as shown in the example.
You have to create an object, in order to modify the values. There's plenty of examples on the internet.
