How to convert json array to json objects : I need to convert a JSON array to JSON objects by id as key for every object in javascript.

What I have:
    [{
       "author" : "aaaa",
       "catid" : 22,
       "id" : 23,
       "name" : "Book a",
       "size" : 56658
     }, {
       "author" : "bbbb",
       "catid" : 22,
       "id" : 24,
       "logo" : "logo",
       "name" : "Book b",
       "size" : 73386
     }, {
       "author" : "cccc",
       "catid" : 22,
       "id" : 25,
       "logo" : "logo",
       "name" : "Book c",
       "size" : 84777
     }, {
       "author" : "ddd",
       "catid" : 22,
       "id" : 26,
       "logo" : "logo",
       "name" : "Book d",
       "size" : 105139
     }]
What I need:
     {
     "23":{
       "author" : "aaaa",
       "catid" : 22,
       "name" : "Book a",
       "size" : 56658
     }, 
     "24":{
       "author" : "bbbb",
       "catid" : 22,
       "logo" : "logo",
       "name" : "Book b",
       "size" : 73386
     }, 
     "25":{
       "author" : "cccc",
       "catid" : 22,
       "logo" : "logo",
       "name" : "Book c",
       "size" : 84777
     },
     "26":{
       "author" : "ddd",
       "catid" : 22,
       "logo" : "logo",
       "name" : "Book d",
       "size" : 105139
     }}