Forum Discussion
fazlook
5 years agoFrequent Contributor
Here is the JSON I got, I converted my XML to JSON......should I still save it as jason.js in test complete ?
{
"Mappings": {
"Test": [
{
"-id": "Test_1000_test",
"TestIdMapping": [
"Test_1001_test1",
"Test_1002_test2"
]
},
{
"-id": "Test_2000_test",
"TestIdMapping": [
"Test_2001_test1",
"Test_2002_test2",
"Test_2003_test3"
]
}
]
}
}
Now, How could I read look for id = Test_1000_test and once found, I loop into the childs and push them into an array ?
SangeetNenwani
5 years agoContributor
Hello fazlook ,
Did you find any solution? I want to convert a xml file into json using testcomplete.
- fazlook5 years agoFrequent Contributor
- SangeetNenwani5 years agoContributor
hey fazlook
According the requirement of task, I can't use external website. I have to make a function within testcomplete that could take a js or xml file from given folder and convert into json- ebarbera5 years ago
Staff
Hi SangeetNenwani -
This doesn’t seem to be a TestComplete specific issue - but try taking a look at this thread, there are some suggestions listed here: https://stackoverflow.com/questions/5113711/convert-xml-to-json-format