Attributes
Each input will need an attribute
that will define the key in formState
it
will control. Attributes can be defined as dot notation strings for nested json
data.
{firstName: 'John',tags: [ "Admin" ],address: {postcode: "E20 6PQ"},profiles: [{type: "facebook",url: "https://facebook.com/john"}]}
Given the above data each attribute can be defined as below.
Attribute | Value |
---|---|
firstName | John |
tags.0 | Admin |
address.postcode | E20 6PQ |
profiles.0.type |