modify type to use new JSON format sent by the backend.

i.e., 'type' key has become '_type'