Skip to content

Retrieve specific data from firebase Javascript

New to javascript here. I’m trying to pull a specific set of data from my firebase database and print it to my website but I am struggling to do so. The problem is it prints out every field in the database. As you can see in this image, I would like the fields for just that particular ID printed out

how do i copy an array correctly

im trying to make a copy of an array but when i change the copy it also changes the original. i have tried using Object.assign([], scenes), scenes.clone() and tried using a for loop Answer You can also try const arrayCopy = JSON.parse(JSON.stringify(initialArray)), although the method using the spread operato…