I have a JSON with a list of numbers from 1 to 10. How would I essentially split the list into half so that 1-5 gets saved into a new json, and 6-10 gets saved in another json?
var json = JSON.parse(body);
I have a JSON with a list of numbers from 1 to 10. How would I essentially split the list into half so that 1-5 gets saved into a new json, and 6-10 gets saved in another json?
var json = JSON.parse(body);
Copyright © 2021 Jogjafile Inc.
Maybe take a look at some of these methods from Array: splice, slice ;)
E.g.: