質問

i want to create query that show all the artists that thay are in Reggae and Rock music i try this but it not work..

[{
  "id": null,
  "name": "Rock music",
  "or:name": "Reggae",
  "type": "/music/genre",
  "/music/genre/artists": []
}]
役に立ちましたか?

解決

Since you're after artists, I'd recommend turning the query inside out and asking for artists, not genres. This will return artists names, IDs, and genres for all artists which include a genre of rock music or reggae:

[{
  "id": null,
  "name": null,
  "type": "/music/artist",
  "genre": [{
    "name|=": [
      "Rock music",
      "Reggae"
    ]
  }],
  "g:genre": []
}]

It's be more robust to use the IDs for the genres rather than their names in case someone decides the genre should be called "Rock" instead of "Rock music."

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top