Scythe
❔ Sorting a JObject by child values
I have JSON being returned by an API that I'm trying to sort to find the most relevant result. Here's an example of the JSON
I need to work out which track is the most relevant which I was going to by comparing/sorting by playCount/rating values (So Wonders of the universe would be the preferred result above) but I'm struggling to find a good way to sort the track array by the child values.
Can someone point me in the right direction?
18 replies
JSON child objects within a RestRequest body
I have a working API call in Postman that gets data from another application using a filter. Using the C# code that Postman outputs works, but doesn't seem to include the filter object within my json body. So with the example below:
C# code
JSON Body in Postman
When run in Postman, I correctly get 3 results returned that match the filter arguments. When run in C# I get 18,000 results as the filter object doesn't appear to be passed correctly and it's only getting the source/field values.
I'm assuming I need to do something else to wrap the filter object within the json body object so that it's parsed correctly but I haven't been able to work out what that syntax should be
5 replies