I have a spark RDD(org.apache.spark.rdd) made from a JSON string that looks like this :
{"id":1 , "text":"sample1"}
I am using spray JSON in my application and I need to extract the keys into a JsArray (keys_jsArray)
- (contains id, text).
Also the values to be extracted into another JsArray
. - (contains 1, sample1)
I am stuck in parsing the RDD to extract the keys and values so that I can form two JsArrays.