on 10-06-2017 11:04 AM
Hello All,
I am new to SAP FIORI. I have to call web service having JSON Array and JSON objects. In this JSON ARRAY we have element named URL as HTML pages. We have to fetch data from these HTML pages and display that data in list. JSON as follows:We have "results" JSON array, in this we have "url" tag having MAIN URL. And from this MAIN URL we have to fetch data. This url opens an HTML page and to open this we have to use some credentials.
{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "https://some url", "type" : "data"
},
"url" : "MAIN URL"
}]}}
Hello,
What I understand your requirements, here is what you should do.
Your JSON you show use can be accessed through JavaScript like this
Var myMainURL = myJson.d.results[0].url
With this, you can do in JavaScript :
Window.location = myMainURL;
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.