Open michaelwiltfong-okta opened 1 year ago
Looks like you're storing the names of the dinosaurs as the value attribute of the select tag.
Looking at MDN's docs around the Option class you can pass in a second parameter that will set value to a specific value.
value
Maybe you can use JSON.parse()link here to store the object in the HTML and then use JSON.parse() to retrieve it here
JSON.parse()
Sorry you'll want to use JSON.Stringify() to store the data and then JSON.parse() to retrieve it. JSON.Stringify()
JSON.Stringify()
Looks like you're storing the names of the dinosaurs as the value attribute of the select tag.
Looking at MDN's docs around the Option class you can pass in a second parameter that will set
value
to a specific value.Maybe you can use
JSON.parse()
link here to store the object in the HTML and then useJSON.parse()
to retrieve it here