Created
May 3, 2013 20:33
-
-
Save lancecarlson/5513834 to your computer and use it in GitHub Desktop.
example array of objects to JSON stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stream = JSONStream.stringifyObject() | |
stream.pipe(response) | |
_.pairs(myObject).map(function(current) { stream.write.apply(stream, current); }) | |
stream.end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment