I am quite a beginner when it comes to programming and currently having a Problem. I have an Array with 4 items (you can see the Array at the Code section below) and all the four items have their specific id (1-4).
The Thing i want to Program is a method which runs individual Code for each Array item. I thought i can solve this Problem by making if Statements where i simply check for the id's (which are individual at every item). But how can i do that??
If someone has a even better idea he can tell me that id for sure.
best regards John.
{ id: 1, name: 'BMW', price: 250, quantity: ''},
{ id: 2, name: 'Google', price: 110, quantity: ''},
{ id: 3, name: 'Apple', price: 1000, quantity: ''},
{ id: 4, name: 'Twitter', price: 50, quantity: ''}