0

I have the JSON response below

d: {
    __metadata: {...}-
    Items: {
       __metadata: {
          type: "Collection(SP.Taxonomy.TaxonomyFieldValue)"
       }-
       results: [1]
          0:  {
              Label: "Disability & Mental Health"
              TermGuid: "efada5a2-3b92-48ea-91b0-32c7c5f1d85e"
              WssId: 8
         }
    }-
}

Does anyone know how to get the Label value using d/results(0) format? Not a big user of the REST service.

Any help is very much appreaciated.

  • Do you want to get it using JavaScript? If not, you can just get it by d/results(0)/Label – Akhoy Aug 3 '15 at 5:12
  • Wouldn't it be d/Items/results(0)/Label. I've tried that and it doesn't get me the value. – adzydoodles Aug 3 '15 at 5:20
  • I'm using Workflow Designer on VS 2013 btw. I made use of the rest service to get the json. – adzydoodles Aug 3 '15 at 5:21
  • My bad. Didn't see the items. Try using d/Items/results/0/Label. – Akhoy Aug 3 '15 at 5:25
  • Still doesn't work. Any idea what the [1] in "results: [1]" means? I can retrieve the title fine but for the Label doesn't seem to work, when traversing the properties is the "Ïtems" property not needed? – adzydoodles Aug 3 '15 at 5:33
0

So weirdly enough the json being returned by sharepoint was of a different format. But I got it by using d/Portfolio/results(0)/Label.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.