Skip to Content
0
May 07, 2018 at 10:32 AM

Read the Key of a value from XSOData

319 Views

Hello Experts,

Could someone help me with my below query? Thanks in advance :)

Consider the below odata service

d: {  results: [{   __metadata: { type: "", uri: "", },                          ID: 1001,
    Name: "SAP",
    Address: "Germany",
    Phone: "43230986"}

When I make a call to the odata from my view.xml as,

  <Text text= {ID} /> 

  <Text text= {Name} />

  <Text text= {Address} />

  <Text text= {Phone} />

I get my output as ,

1001 SAP Germany 43230986

Is there a way, where I can consume the key itself from the odata?

As in, I should get my output as,

ID Name Address Phone