You can create a class to parse the input, roughly outlined as follows:
public class Item {
public String name, value;
}
@RemoteAction public static void createContact(String jsonObjResult) {
// Serialize Items
Item[] values = (List<Item>)JSON.deserialize(jsonObjResult, List<Item>.class);
// process items to create contacts
}
Note: This would be a lot easier if you used standard JSON notation:
{ "FirstName": "xyz", "LastName": "xyz", "Email": "[email protected]", "Phone": "789456", "BirthDate": "2013-05-13" }
Then, you could serialize the object directly:
@RemoteAction public static void createContact(String jsonObjResult) {
Contact record = (Contact)JSON.deserialize(jsonObjResult, Contact.class);
insert record;
}