ajax respose to json array in javascipt : I want to achieve this using javascript.
     
    [{ "employeeName":"emp1", "Deaprtment":"dept1"},
     { "employeeName":"emp2", "Deaprtment":"dept1"}
    ]

to
     {"dept1":{"emp1","emp2"}}

please advise for possible solution using javascript.


