How is it possible to modify a text content within an element of a dynamic list via ID in javascript?

Good evening, on my site there is a list of basketball camps. It is dynamic and is populated via a database. In the latter I have set a boolean “availability” attribute which, if set to true, indicates that the field is available, otherwise not available. The word “available” or “not available” compares within each element of the dynamic list. How is it possible from javascript to insert this result in this text field once compared with the availability flag?

I tried with this code, but having the same ID in each article, the text always takes the same value.

  1. Never use a pic to show your code, better use a code-block (anybody want to retype all the code and waste his time).

  2. Try to work more with console-logs and analyse your own code (what does the code exactly do at which part of code)?

example:

for (var i=0; i<results.length; i++ ){
	console.log(results.items[i].disponibilit)   		//!!!
	console.log(results.items[i].disponibilit = true)	//???
	console.log(results.items[i].disponibilit == true)	//???
	console.log(results.items[i].disponibilit === true)	//???
	console.log(results.items[i].disponibilit === "true")	//???
}