Files
rspade_system/node_modules/collect.js/docs/api/toJson.md
2025-12-03 21:28:08 +00:00

348 B
Executable File

toJson()

The toJson method converts the collection into JSON string:

const collection = collect({
  id: 384,
  name: 'Rayquaza',
  gender: 'NA',
});

const json = collection.toJson();

// {"id": 384, "name": "Rayquaza", "gender": "NA"}

View source on GitHub