How to get values from JSON XMLHttpRequest?
17:07 27 Feb 2022

I am new to web development, and I am using a XMLHttpRequest() in JavaScript to get data from an API. I am trying to create variables from the data but am getting an error when I try to do the following. Does anyone know what is wrong with the line var data1 = data["data1"];?