Skip to content

Instantly share code, notes, and snippets.

@leewin12
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leewin12/20dbaf9afe001e8fc217 to your computer and use it in GitHub Desktop.
Save leewin12/20dbaf9afe001e8fc217 to your computer and use it in GitHub Desktop.
Just I try to make it a line.
import groovy.json.JsonSlurper
new JsonSlurper() {
jsonSlurper -> new File('/Users/gregory/be.json').text.split('\n').collect { jsonSlurper.parseText(it).accountId }.unique().each { println it }
}
@leewin12
Copy link
Author

be.json example
{ ... "accountId":12341421, ....}\n
{ ... "accountId":12341421, ....}\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment