javascript - Why shouldn't the server respond with a JSON Array?
问题 According to this Angular 2 guide: Don't expect the decoded JSON to be the heroes array directly. This server always wraps JSON results in an object with a data property. You have to unwrap it to get the heroes. This is conventional web API behavior, driven by security concerns. ('Heroes' is an array of objects). The link in the above paragraph says : Always return JSON with an Object on the outside Always have the outside primitive be an object for JSON strings: Exploitable: [{"object":