Skip to content
Advertisement

Tag: object

Get image from object and display on HTML

I want to get an image from an object in JavaScript and display it via HTML. The text parts are working fine, like the movie name etc., but I cannot see my image. The only thing I see is black_adam.jpg as text. The image is in the same folder as my index.html. I tried to add a slash in front

Add object to array in class component

I have a list of products (unordered list which I apply at the beginning and it shows on screen) and after click on one of them for example: milk, app should add it on screen to list “to buy”. But it shows on the screen after I click on another element or second time on the first one. It also

JS Object – Filter for a specific field

In order to check from my frontend application if there is or not a PDF I want to search into my nested object ‘translations’ for the field named “pdf_url”. The problem I am dealing with i that for every cardObject (id: 118, 119) the pdf_url can be in position 0, 1, 2, 3 or n inside that the translations array.

Advertisement