changed api controller to rerturn rest json format of a map with data as
the key