I have a scala Array of the form :
temp: Array[(Array[String], Long)]
# Eg. Array((Array(attr1,1.0,attr2),15),(Array(1.0,attr5),15),(Array(attr3,attr4,0.0),15),(Array(attr3,attr4),5))
I need to take this Array and map it to something like
temp: Array[(Array[String],String, Long)]
# Eg. Array((Array(attr1,attr2),1.0,15),(Array(attr5),1.0,15),(Array(attr3,attr4),0.0,15),(Array(attr3,attr4),NULL,15))
I am searching for the string 1.0 and 0.0 and making a new array with 1.0 and 0.0 deleted from the original. Incase 1.0 and 0.0 not present then use NULL as the value. Is there an easy way to do this?