Hi,

I'm pretty new to both Spark (and Scala), so I would like to seek some help
here:

I have this dataset in JSON:

In short, I'm trying to find out the top 10 hobbies, sorted DESC by count.

So basically i did:

Prints...

This is where I got stucked... I tried and got:

What do I do with an Array[ANY]... should I be casting it? How about
ArrayBuffer, how I can iterate within to do counting?

One thing I tried unsuccessfully:


Any advice or hints are much appreciated, thanks.

Ads



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Finding-most-occurrences-in-a-JSON-Nested-Array-tp20971.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to