JSONDecode not working

JSONDecode isn’t working for me, whenever I try to access something with it, it always returns nil.

First I made sure that it was returning the correct thing. With local test = game.HttpService:GetAsync("http://adatabaseurl.atopdomain/getPoints?userid=66932798") print(test) Returns [{"Points":1234}]
To return the data from the online server, I am using JSON.stringify() in node.js.

If I attempt to print the points with
local test = game.HttpService:GetAsync("http://adatabaseurl.atopdomain/getPoints?userid=66932798") local test2 = game.HttpService:JSONDecode(test) print(test2.Points) it returns nil.

Is there something wrong with the formatting of the JSON causing it to return nil?

if this is the data the server is returning, you have an array full of dictionaries. To access points in this scenario, you’d need to put test2[1].Points.

If you’re using express for the server, use response.json(your_object_here) to serve the correct JSON, ensuring you’ve not wrapped the object in an array

[] indicates an array, {} indicates a dictionary.