Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
print(JSON.stringify([1,2,3], function replacer(key, value) {
if (!Array.isArray(value)) {
return value;
var len = value.length;
var result = { length: len };
for (var i = 0; i < len; ++i) {
// Array holeを認識するかはお好みで...
result[i] = value[i];
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.