added flatMap to the JsonCollection class

When doing nested data transformation om properties of the collection, it's most useful to use flatMap(f) instead of depending on the scala flatten implementation of the collection returned of function f
Merge pull request #2 from kareblak/patch-1

added flatMap to the JsonCollection class