# \[POSTED 2 DAYS AGO..PLZ HELP!!\] Capturing API data and displaying in a repeater--Error(


**URL:** <https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [November 24, 2019, 5:45pm UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558 "2019-11-24T17:45:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirvansmo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/sirvansmo/32/15115_2.png) [@sirvansmo](https://forum.wixstudio.com/u/sirvansmo)\
**Post date:** [November 24, 2019, 5:45pm UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558/1 "2019-11-24T17:45:06Z")

</div>

Basically i am able to fetch data from and API but then displaying in a repeater is an issue considering that it comes in (groups of data) and i am not able to display in a repeater. Repeater is needed here coz several results can be found and i though repeater is gonna be the best option to display. Please check my code closely cox there might be an error i am newbie…

Erorr message:

```javascript
Loading the code for the Check page. To debug this code, open fnaox.js in Developer Tools.
Wix code SDK error: Each item in the items array must have a member named `_id` which contains a unique value identifying the item.
Check
Line 18
Wix code SDK Warning: The data that was passed to data contained at least two items with the same ID: . Only the first item was accepted.
Check
Line 18
Wix code SDK error: Each item in the items array must have a member named `_id` which contains a unique value identifying the item.
Check
Line 18
Wix code SDK Warning: The data that was passed to data contained at least two items with the same ID: . Only the first item was accepted.

```

Here is the front end code:

```javascript
//Form's page code
import {getCurrentTemp} from 'backend/serviceModule';

export function buttonFetch_click(event, $w) {
getCurrentTemp($w("#emailInput").value)
.then(CurrentTemp => {
// add an _id property to each object
CurrentTemp.forEach(item => item._id = item.id);
// feed the data to the repeater
$w('#repeater1').data = CurrentTemp;
} );
}

$w.onReady(function () {
$w("#repeater1").forEachItem( ($item, itemData, index) => {
if(itemData.text){
$item("#textResults").text = + itemData.Title+ "\n"
+ "Name: " + itemData.BreachDate + "\n"
+ "Symbol: " + itemData.Description + "\n"
+ "Rank: " + itemData.DataClasses + "\n";

}
else {
$item("#textResults").text = "No way!";
}
} );
} );

```

Backed, i dont thin if there is any issue here

```javascript
//serviceModule.jsw
import {fetch} from 'wix-fetch';
export function getCurrentTemp(inputemail) {
const url2 = "https://haveibeenpwned.com/api/v3/breachedaccount/"+inputemail+"?truncateResponse=false";
return fetch(url2, {method: 'GET',
headers: {
"Accept": "application/json",
'Content-Type': 'application/json',
'hibp-api-key':'xxxxxxxxxxxx'
} })
.then(response => response.json());

}

```

@Yisrael (Wix)  
@givemeawhisky  
Assist plz!

---

<div class="post-metadata">

**Author:** ![sirvansmo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/sirvansmo/32/15115_2.png) [@sirvansmo](https://forum.wixstudio.com/u/sirvansmo)\
**Post date:** [November 25, 2019, 12:17pm UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558/2 "2019-11-25T12:17:49Z")

</div>

any help @givemeawhisky  
@yisrael-wix  
@sapirh  
@tiaan  
@ken_wix

---

<div class="post-metadata">

**Author:** ![sirvansmo](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/sirvansmo/32/15115_2.png) [@sirvansmo](https://forum.wixstudio.com/u/sirvansmo)\
**Post date:** [November 26, 2019, 9:44am UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558/3 "2019-11-26T09:44:30Z")

</div>

No help here? or its too basic?

---

<div class="post-metadata">

**Author:** ![devtestshr](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/devtestshr/32/18209_2.png) [@devtestshr](https://forum.wixstudio.com/u/devtestshr)\
**Post date:** [February 5, 2023, 12:58pm UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558/4 "2023-02-05T12:58:51Z")

</div>

Sort the dynamic dataset by ID before anything.

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [February 6, 2023, 9:42pm UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558/5 "2023-02-06T21:42:54Z")

</div>

This post is several years old.  
No need to bump-it-up!

Anybody has any interest to get any answer here anymore.

---

<div class="post-metadata">

**Author:** ![devtestshr](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/devtestshr/32/18209_2.png) [@devtestshr](https://forum.wixstudio.com/u/devtestshr)\
**Post date:** [February 7, 2023, 6:21pm UTC](https://forum.wixstudio.com/t/posted-2-days-ago-plz-help-capturing-api-data-and-displaying-in-a-repeater-error/35558/6 "2023-02-07T18:21:58Z")

</div>

I got this type of error yesterday… so it’s still a thing…
