0

I want to update collection below with java

{
    "_id" : ObjectId("590db524e4b0c14bc0704cd8"),
    "uid" : "a528c6a2-411d-4316-b7ad-3143005122ab",
    "reportTypeKey" : "columnChart_OnPollsFinishTime",
    "data" : {
        "fk1" : "4555",
        "pis1" : [ 
            "87942d4b-2db0-4d4c-a235-b5b4486b8aa8", 
            "8ca40661-c045-4fa5-b3a7-ea2215ce5668"
        ],
        "pos1" : []

    }
} 

I want to change "fk1" : "4555" to "fks" : ["4555"] please help me
Thanks

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
Mr White
  • 97
  • 1
  • 9
  • Your question is too broad, please refine it. – Vincent Cantin Aug 01 '17 at 08:45
  • What have you tried? The basic question has been answered over and over at [Update MongoDB field using value of another field](https://stackoverflow.com/questions/3974985/update-mongodb-field-using-value-of-another-field) and [How do I remove a field completely from a document?](https://stackoverflow.com/questions/6851933/how-do-i-remove-a-field-completely-from-a-document). There is nothing difficult about implementing the statements in Java. That is if you even need to. Most data conversions really should be simply scripted into the shell. – Neil Lunn Aug 01 '17 at 08:45

0 Answers0