开发者

Not able to get the data from the JSON in OpenSocial App!

开发者 https://www.devze.com 2022-12-22 20:56 出处:网络
I have follwing JSON: {\"mykey\":[{name:\"Jak\",interests:\"movies\"}]} and following opensocial app code:

I have follwing JSON: {"mykey":[{name:"Jak",interests:"movies"}]}

and following opensocial app code:

  <script type="text/os-template" require="mykey">                           
    <ul>
      <li repeat="${mykey}">
          <s开发者_Go百科pan>Offer id: ${Cur.name}</span>              
          <span>Offer: ${Cur.interests}</span>          
      </li>
    </ul>
 </script>

but the App is not able to get the data from the JSON? Not able to find out the issue!


I got the issue, actually the fix is as follows:


    Offer id: ${Cur.key.name}
    Offer: ${Cur.key.interests}

0

精彩评论

暂无评论...
验证码 换一张
取 消