Duplicate keys in API
I have noticed that numerous citations in my database are split into several records in the API with the same key. Why is it organized in this way? Is there any way to keep the API as one key per citation? That would make it a lot easier to retrieve/use the API data in other applications.
So I am using an API call of this format:
https://api.zotero.org/users/123456/collections/ABC123ABC/items
I am parsing the data as such:
for (let i=1; i<citations.length; i++)
{
results.push({
key:citations[i].data.key,
title:citations[i].data.title,
abstractNote:citations[i].data.abstractNote,
});
In doing so there are multiple records which match data.key, each with different metadata.
Am I parsing this wrong? Do I have to first get an array of keys within a collection and then do a separate API call for each key?