my json looks like this.
[
{"name": "AABC Register Ltd (Architects accredited in building conservation), with effect from the 2016 to 2017 tax year"},
{"name": "Academic and Research Surgery Society of"},
{"name": "Academic Gaming and Simulation in Education and Training Society for"},
{"name": "Academic Primary Care Society for"}
]
and the code I use to parse this and add it to mongoDB is this
val sourceOrganisations: JsValue = Json.parse(getClass.getResourceAsStream("/json/ApprovedOrganisations.json"))
val organisations: Seq[String] = (sourceOrganisations.as[JsArray] \\ "name").map(jsval => jsval.toString())
println(organisations)
organisations.foreach(organisation => this.insert(Organisation(organisation)))
when querying mongo i get
{ "_id" : ObjectId("5c3dcf309770222486f50b4a"), "name" : "\"Accounting Association American\"" }
but i want this
{ "_id" : ObjectId("5c3dcf309770222486f50b4a"), "name" : "Accounting Association American" }
I have tried looking at why there might be extra quotes but can't find the reason