The JSON is
{"FirstName": "Steve", "LastName": "Smith"}
Remove the [0]
from result[0].FirstName
:
$('#Name').val(result.FirstName);
The [0]
part would only be applicable if result
was an array of objects and you wanted the first item, e.g., if your JSON was something like this:
[{"FirstName": "Steve", "LastName": "Smith"}, {"FirstName": "Mary", "LastName": "Jones"}]