Supplying MudBlazor Autocomplete with content from a service - autocomplete

I have here an example of an Autocomplete taken from the MudBlazor component library documentation that offers options as I type from a pre-defined list of possible values:
<MudAutocomplete T="string" Label="Select US state" #bind-Value="selectedValue" SearchFunc="#Search" />
#code {
private string selectedValue;
private string[] states =
{
"Alabama", "Alaska", "American Samoa", "Arizona",
"Arkansas", "California", "Colorado", "Connecticut",
"Delaware", "District of Columbia", "Federated States of Micronesia",
"Florida", "Georgia", "Guam", "Hawaii", "Idaho",
"Illinois", "Indiana", "Iowa", "Kansas", "Kentucky",
"Louisiana", "Maine", "Marshall Islands", "Maryland",
"Massachusetts", "Michigan", "Minnesota", "Mississippi",
"Missouri", "Montana", "Nebraska", "Nevada",
"New Hampshire", "New Jersey", "New Mexico", "New York",
"North Carolina", "North Dakota", "Northern Mariana Islands", "Ohio",
"Oklahoma", "Oregon", "Palau", "Pennsylvania", "Puerto Rico",
"Rhode Island", "South Carolina", "South Dakota", "Tennessee",
"Texas", "Utah", "Vermont", "Virgin Island", "Virginia",
"Washington", "West Virginia", "Wisconsin", "Wyoming",
};
private Task<IEnumerable<string>> Search(string value)
{
return Task.FromResult(states.Where(x => x.Contains(value, StringComparison.InvariantCultureIgnoreCase)));
}
}
This is exactly what I need for my project. But how do I get the values on demand from a web api while the user types? Also, is there a way to influence how the options are presented in the drop-down list?

Make your request in the Search method. Replace the return Task.FromResult(states.Where(x => x.Contains(value, StringComparison.InvariantCultureIgnoreCase))); line with the results of the call to your API.

Related

multiple search and filter data returning count of each filter in nestjs mongodb

I want to filter the items in the database by their fields and also return the count of each filter.
Example is when I select to return specific brand names I want to see the number of brand name available.
Is there any search service I could use like Azure search or a way to implement this in NestJs and mongodb
This is the Database collection
{
"brand": "Screaming Eagle, The Flight",
"producer": "Screaming Eagle",
"productionCountry": "America",
"region": "Napa Valley",
"appellation": "Oakville",
"vintage": "2016",
"grape": "Cabernet Sauvignon",
"maturity": "25",
"case": "3 bottles",
"origin": "SECONDARYMARKET",
"type": "Red"
},{
"brand": "Joseph Phelps, Insignia",
"producer": "Joseph Phelps",
"productionCountry": "America",
"region": "Napa Valley",
"appellation": "St. Helena",
"vintage": "2012",
"grape": "Cabernet Sauvignon",
"maturity": "25",
"case": "6 bottles",
"origin": "SECONDARYMARKET",
"type": "Red"
},{
"brand": "Joseph Phelps, Insignia",
"producer": "Joseph Phelps",
"productionCountry": "America",
"region": "Napa Valley",
"appellation": "St. Helena",
"vintage": "2012",
"grape": "Cabernet Sauvignon",
"maturity": "25",
"case": "6 bottles",
"origin": "SECONDARYMARKET",
"type": "Red"
},{
"brand": "Continuum",
"producer": "Continuum",
"productionCountry": "America",
"region": "Napa Valley",
"appellation": "Oakville",
"vintage": "2017",
"grape": "Cabernet Sauvignon",
"maturity": "26",
"case": "6 bottles",
"origin": "SECONDARYMARKET",
"type": "Red"
},{
"brand": "Continuum",
"producer": "Continuum",
"productionCountry": "America",
"region": "Napa Valley",
"appellation": "Oakville",
"vintage": "2017",
"grape": "Cabernet Sauvignon",
"maturity": "26",
"case": "6 bottles",
"origin": "SECONDARYMARKET",
"type": "Red"
}
This is known as "facets" and it is supported by Azure Cognitive Search and MongoDB. In Azure Cognitive Search, you have to set facetable to true for the fields you'd like to get counts for, such as brand then specify in the query "facets": ["brand"].
For more information Azure Search see: https://learn.microsoft.com/en-us/azure/search/search-faceted-navigation
This works in MongoDb using the $facet aggregation operator which you can read more about here: https://www.mongodb.com/docs/manual/reference/operator/aggregation/facet/

Checkout.js + Server-Side -> country_code and phone issues using REST API /v1/payments/payment

Without avail, I cannot get the country_code (CA) or phone to fill up after successfully calling create payment.
Country always show up as "United States" and Phone is "+1".
With or without shipping_address, shipping_preference: NO_SHIPPING. Using so-called examples (which might be outdated or not correctly documented), and the API documentation, which would be great to have examples included...
This is the create-payment query in json. I'm getting the same structure back with the following additions:
id:PAY-xxx
state:created
phone in payer_info (but no country_code as expected from the API)
created_time
...and...
PayPal's links in links.
Which indicate that the call was successful.
Either I should ditch "/v1/payments/payment" for something else I'm not aware of, or Paypal API is not up-to-date.
----- json create-payment query -----
{
"intent": "sale",
"payer": {
"payment_method": "paypal",
"payer_info": {
"email": "<snip>",
"first_name": "Bob",
"last_name": "Smith",
"billing_address": {
"line1": "1 notre dame",
"line2": "",
"city": "Montreal",
"country_code": "CA",
"postal_code": "H1H 1H1",
"phone": "011862212345678",
"state": "QC"
}
}
},
"application_context": {
"brand_name": "Server-side Test",
"locale": "fr_CA",
"landing_page": "Billing"
},
"transactions": [
{
"description": "The payment transaction description.",
"invoice_number": "5b5a38cb35bb7",
"custom": "merchant custom data",
"payment_options": {
"allowed_payment_method": "INSTANT_FUNDING_SOURCE"
},
"amount": {
"total": "5.75",
"currency": "CAD",
"details": {
"subtotal": "5",
"tax": "0.75"
}
},
"item_list": {
"items": [
{
"name": "item 1",
"description": "item 1 description",
"quantity": "1",
"price": "1",
"tax": "0.15",
"currency": "CAD"
},
{
"name": "item 2",
"description": "item 2 description",
"quantity": "2",
"price": "2",
"tax": "0.6",
"currency": "CAD"
}
],
"shipping_address": {
"recipient_name": "Bob Smith",
"line1": "1 notre dame",
"line2": "",
"city": "Montreal",
"country_code": "CA",
"postal_code": "H1H 1H1",
"phone": "011862212345678",
"state": "QC"
}
}
}
],
"redirect_urls": {
"return_url": "http:\/\/<snip>\/return.php",
"cancel_url": "http:\/\/<snip>\/cancel.php"
}
}

Why can't I remove the Shipping address from this IPP QBO v3 API Customer object

I'm using the Intuit Partner Platform v3 QBO API to try to update a Customer object. The sole objective for the purpose of this post is to remove the shipping address.
Here's the original object, queried before the change:
{
"domain": "QBO",
"FamilyName": "last",
"DisplayName": "my display name",
"Title": "mr.",
"PreferredDeliveryMethod": "Print",
"GivenName": "first",
"FullyQualifiedName": "my display name",
"BillWithParent": false,
"Job": false,
"BalanceWithJobs": 0,
"Taxable": true,
"MetaData": {
"CreateTime": "2014-09-22T18:49:43-07:00",
"LastUpdatedTime": "2014-09-22T18:49:44-07:00"
},
"BillAddr": {
"City": "city 1",
"Country": "USA",
"Line1": "billing address line 1\nbilling address line 2",
"PostalCode": "98765",
"CountrySubDivisionCode": "ST",
"Id": "130"
},
"MiddleName": "mid",
"Active": true,
"Balance": 0,
"SyncToken": "0",
"Suffix": "suf",
"CompanyName": "my company name",
"ShipAddr": {
"City": "city 2",
"Country": "USA",
"Line1": "shipping address line 1\nshipping address line 2",
"PostalCode": "54321",
"CountrySubDivisionCode": "TS",
"Id": "131"
},
"PrintOnCheckName": "my display name",
"sparse": false,
"Id": "212"
}
Here's the request body when I do the update (SyncToken matches, sparse is false...):
{
"domain": "QBO",
"DisplayName": "my display name",
"Title": "mr.",
"PreferredDeliveryMethod": "Print",
"GivenName": "first",
"FullyQualifiedName": "my display name",
"BillWithParent": false,
"Job": false,
"BalanceWithJobs": 0.0,
"Taxable": true,
"MetaData": {
"CreateTime": "2014-09-22T18:49:43-07:00",
"LastUpdatedTime": "2014-09-22T18:49:43-07:00"
},
"sparse": false,
"MiddleName": "mid",
"Active": true,
"Balance": 0.0,
"SyncToken": 0,
"Suffix": "suf",
"CompanyName": "my company name",
"FamilyName": "last",
"PrintOnCheckName": "my display name",
"BillAddr": {
"CountrySubDivisionCode": "ST",
"City": "city 1",
"PostalCode": "98765",
"Line1": "billing address line 1\nbilling address line 2",
"Country": "USA"
},
"Id": "212"
}
And then when I read it again afterwards, it still has the shipping address (though note the SyncToken has incremented, so the API 'got the message':
{
"domain": "QBO",
"FamilyName": "last",
"DisplayName": "my display name",
"Title": "mr.",
"PreferredDeliveryMethod": "Print",
"GivenName": "first",
"FullyQualifiedName": "my display name",
"BillWithParent": false,
"Job": false,
"BalanceWithJobs": 0,
"Taxable": true,
"MetaData": {
"CreateTime": "2014-09-22T18:49:43-07:00",
"LastUpdatedTime": "2014-09-22T18:51:20-07:00"
},
"BillAddr": {
"City": "city 1",
"Country": "USA",
"Line1": "billing address line 1\nbilling address line 2",
"PostalCode": "98765",
"CountrySubDivisionCode": "ST",
"Id": "130"
},
"MiddleName": "mid",
"Active": true,
"Balance": 0,
"SyncToken": "1",
"Suffix": "suf",
"CompanyName": "my company name",
"ShipAddr": {
"City": "city 1",
"Country": "USA",
"Line1": "billing address line 1\nbilling address line 2",
"PostalCode": "98765",
"CountrySubDivisionCode": "ST",
"Id": "130"
},
"PrintOnCheckName": "my display name",
"sparse": false,
"Id": "212"
}
I've found that if I just set a SINGLE line of the shipping address (to 'x', for example, then the change goes through, but what I'm trying above (which is what I really want—to DELETE the shipping address), has failed. I don't see it on the known issues list, but I know that when a friend of mine recently migrated from QuickBooks Desktop to QuickBooks Online, shipping addresses were populated where previously there was just a billing address.
Anyone know how to achieve this?
Thanks!
UPDATE Adding working JSON example.
{
"Customer": {
"Taxable": false,
"BillAddr": {
"Id": "9",
"Line1": "100 Street",
"City": "Bangalore",
"Country": "India",
"CountrySubDivisionCode": "Karnataka",
"PostalCode": "560103"
},
"ShipAddr": {
"Id": "9",
"Line1": "100 Street",
"City": "Bangalore",
"Country": "India",
"CountrySubDivisionCode": "Karnataka",
"PostalCode": "560103"
},
"Job": false,
"BillWithParent": false,
"Balance": 0,
"BalanceWithJobs": 0,
"PreferredDeliveryMethod": "Email",
"domain": "QBO",
"sparse": false,
"Id": "16",
"SyncToken": "0",
"MetaData": {
"CreateTime": "2014-09-22T21:54:13-07:00",
"LastUpdatedTime": "2014-09-22T21:54:13-07:00"
},
"GivenName": "AA",
"FullyQualifiedName": "AA",
"DisplayName": "AA",
"PrintOnCheckName": "AA",
"Active": true
},
"time": "2014-09-22T21:55:17.28-07:00"
}
Update Request
{
"Taxable": false,
"BillAddr": {
"Id": "9",
"Line1": "100 Street",
"City": "Bangalore",
"Country": "India",
"CountrySubDivisionCode": "Karnataka",
"PostalCode": "560103"
},
"Job": false,
"BillWithParent": false,
"Balance": 0,
"BalanceWithJobs": 0,
"PreferredDeliveryMethod": "Email",
"domain": "QBO",
"sparse": false,
"Id": "16",
"SyncToken": "0",
"MetaData": {
"CreateTime": "2014-09-22T21:54:13-07:00",
"LastUpdatedTime": "2014-09-22T21:54:13-07:00"
},
"GivenName": "AA",
"FullyQualifiedName": "AA",
"DisplayName": "AA",
"PrintOnCheckName": "AA",
"Active": true
}
Get By Id
{
"Customer": {
"Taxable": false,
"BillAddr": {
"Id": "9",
"Line1": "100 Street",
"City": "Bangalore",
"Country": "India",
"CountrySubDivisionCode": "Karnataka",
"PostalCode": "560103"
},
"Job": false,
"BillWithParent": false,
"Balance": 0,
"BalanceWithJobs": 0,
"PreferredDeliveryMethod": "Email",
"domain": "QBO",
"sparse": false,
"Id": "16",
"SyncToken": "1",
"MetaData": {
"CreateTime": "2014-09-22T21:54:13-07:00",
"LastUpdatedTime": "2014-09-22T21:56:21-07:00"
},
"GivenName": "AA",
"FullyQualifiedName": "AA",
"DisplayName": "AA",
"PrintOnCheckName": "AA",
"Active": true
},
"time": "2014-09-22T21:56:49.814-07:00"
}
Did you try XML payload. It worked fine for me. PFB below request/response.
I'll verify the JSON way and update this post.
<Customer xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="false">
<Id>14</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2014-09-22T21:04:02-07:00</CreateTime>
<LastUpdatedTime>2014-09-22T21:04:02-07:00</LastUpdatedTime>
</MetaData>
<GivenName>Neo</GivenName>
<FamilyName>Light</FamilyName>
<FullyQualifiedName>Neo Light</FullyQualifiedName>
<CompanyName>ABC</CompanyName>
<DisplayName>Neo Light</DisplayName>
<PrintOnCheckName>Neo Light</PrintOnCheckName>
<Active>true</Active>
<PrimaryEmailAddr>
<Address>abc#abc.co.in</Address>
</PrimaryEmailAddr>
<Taxable>false</Taxable>
<BillAddr>
<Id>7</Id>
<Line1>ABC Street</Line1>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>Karnataka</CountrySubDivisionCode>
<PostalCode>560103</PostalCode>
</BillAddr>
<ShipAddr>
<Id>7</Id>
<Line1>ABC Street</Line1>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>Karnataka</CountrySubDivisionCode>
<PostalCode>560103</PostalCode>
</ShipAddr>
<Job>false</Job>
<BillWithParent>false</BillWithParent>
<Balance>0</Balance>
<BalanceWithJobs>0</BalanceWithJobs>
<PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
</Customer>
Update request
<Customer xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="false">
<Id>14</Id>
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2014-09-22T21:04:02-07:00</CreateTime>
<LastUpdatedTime>2014-09-22T21:04:02-07:00</LastUpdatedTime>
</MetaData>
<GivenName>Neo</GivenName>
<FamilyName>Light</FamilyName>
<FullyQualifiedName>Neo Light</FullyQualifiedName>
<CompanyName>ABC</CompanyName>
<DisplayName>Neo Light</DisplayName>
<PrintOnCheckName>Neo Light1</PrintOnCheckName>
<Active>true</Active>
<PrimaryEmailAddr>
<Address>abc#abc.co.in</Address>
</PrimaryEmailAddr>
<Taxable>false</Taxable>
<BillAddr>
<Id>7</Id>
<Line1>ABC Street</Line1>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>Karnataka</CountrySubDivisionCode>
<PostalCode>560103</PostalCode>
</BillAddr>
<Job>false</Job>
<BillWithParent>false</BillWithParent>
<Balance>0</Balance>
<BalanceWithJobs>0</BalanceWithJobs>
<PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
</Customer>
Verified that 'shipAddr' is not present anymore
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2014-09-22T21:07:31.919-07:00">
<Customer domain="QBO" sparse="false">
<Id>14</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreateTime>2014-09-22T21:04:02-07:00</CreateTime>
<LastUpdatedTime>2014-09-22T21:06:58-07:00</LastUpdatedTime>
</MetaData>
<GivenName>Neo</GivenName>
<FamilyName>Light</FamilyName>
<FullyQualifiedName>Neo Light</FullyQualifiedName>
<CompanyName>ABC</CompanyName>
<DisplayName>Neo Light</DisplayName>
<PrintOnCheckName>Neo Light1</PrintOnCheckName>
<Active>true</Active>
<PrimaryEmailAddr>
<Address>abc#abc.co.in</Address>
</PrimaryEmailAddr>
<Taxable>false</Taxable>
<BillAddr>
<Id>7</Id>
<Line1>ABC Street</Line1>
<City>Bangalore</City>
<Country>India</Country>
<CountrySubDivisionCode>Karnataka</CountrySubDivisionCode>
<PostalCode>560103</PostalCode>
</BillAddr>
<Job>false</Job>
<BillWithParent>false</BillWithParent>
<Balance>0</Balance>
<BalanceWithJobs>0</BalanceWithJobs>
<PreferredDeliveryMethod>Email</PreferredDeliveryMethod>
</Customer>
</IntuitResponse>
Thanks

Return multiple city, state suggestions from one zipcode search

I'd like to use an API service of some sort to take in a zipcode and return any cities that match this zipcode.
USPS manual lookup on their site does this, and Crate and Barrel does this in their checkout.
It seems like the zipcode API from USPS is only able to return one city though. I've looked into Geonames database, but it also seems set up for only one city per zip.
Is there a way to accomplish this?
I'll go ahead and post #Matt's answer, since I've used the SmartyStreets ZIP Code API for just that purpose. You can query this API one of three ways:
ZIP Code
City + State
City + State + ZIP Code
For a single ZIP Code (which is what you are asking about) this is a simple GET request:
curl -v 'https://us-zipcode.api.smartystreets.com/lookup?
auth-id=YOUR+AUTH-ID+HERE&
auth-token=YOUR+AUTH-TOKEN+HERE&
zipcode=65202'
The response (with valid AUTH-ID and AUTH-TOKEN) is:
[
{
"input_index": 0,
"city_states": [
{
"city": "Columbia",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": true
},
{
"city": "Hinton",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
},
{
"city": "Lindbergh",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
},
{
"city": "Midway",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
},
{
"city": "Murry",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
},
{
"city": "Prathersville",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
},
{
"city": "Shaw",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
},
{
"city": "Stephens",
"state_abbreviation": "MO",
"state": "Missouri",
"mailable_city": false
}
],
"zipcodes": [
{
"zipcode": "65202",
"zipcode_type": "S",
"default_city": "Columbia",
"county_fips": "29019",
"county_name": "Boone",
"state_abbreviation": "MO",
"state": "Missouri",
"latitude": 38.99775,
"longitude": -92.30798,
"precision": "Zip5",
"alternate_counties": [
{
"county_fips": "29027",
"county_name": "Callaway",
"state_abbreviation": "MO",
"state": "Missouri"
}
]
}
]
}
]
As you can see, this gives the same list of cities as your picture example. It also includes more detailed information on the first city_state in the list.
For completeness, here is a sample request demonstrating all three query options. (n.b. For any request outside of a single ZIP Code, the API requires a POST call):
curl -v 'https://us-zipcode.api.smartystreets.com/lookup?
auth-id=YOUR+AUTH-ID+HERE&
auth-token=YOUR+AUTH-TOKEN+HERE'
-H "Content-Type: application/json"
--data-binary '
[
{
"zipcode":"12345"
},
{
"city":"North Pole",
"state":"AK"
},
{
"city":"cupertino",
"state":"CA",
"zipcode":"95014"
}
]'
And here is the response for that example request:
[
{
"input_index": 0,
"city_states": [
{
"city": "Schenectady",
"state_abbreviation": "NY",
"state": "New York",
"mailable_city": true
},
{
"city": "General Electric",
"state_abbreviation": "NY",
"state": "New York",
"mailable_city": false
},
{
"city": "Schdy",
"state_abbreviation": "NY",
"state": "New York",
"mailable_city": false
}
],
"zipcodes": [
{
"zipcode": "12345",
"zipcode_type": "U",
"default_city": "Schenectady",
"county_fips": "36093",
"county_name": "Schenectady",
"state_abbreviation": "NY",
"state": "New York",
"latitude": 42.81565,
"longitude": -73.94232,
"precision": "Zip5"
}
]
},
{
"input_index": 1,
"city_states": [
{
"city": "North Pole",
"state_abbreviation": "AK",
"state": "Alaska",
"mailable_city": true
}
],
"zipcodes": [
{
"zipcode": "99705",
"zipcode_type": "S",
"default_city": "North Pole",
"county_fips": "02090",
"county_name": "Fairbanks North Star",
"state_abbreviation": "AK",
"state": "Alaska",
"latitude": 64.77911,
"longitude": -147.36885,
"precision": "Zip5"
}
]
},
{
"input_index": 2,
"city_states": [
{
"city": "Cupertino",
"state_abbreviation": "CA",
"state": "California",
"mailable_city": true
}
],
"zipcodes": [
{
"zipcode": "95014",
"zipcode_type": "S",
"default_city": "Cupertino",
"county_fips": "06085",
"county_name": "Santa Clara",
"state_abbreviation": "CA",
"state": "California",
"latitude": 37.32056,
"longitude": -122.03865,
"precision": "Zip5"
}
]
}
]
I hope that helps!
EDIT - I've updated this with an example specific to the question. Thanks to #AmyAnuszewski for calling that out.

How to get USA states programmatically?

I am developing an iphone application in Objective-C.
I have to get the list of the states of USA programmatically. How can I get that list?
I would hard-code the list in the source code. It's likely not to change during the lifetime of the application.
You could download it from wikipedia or some other source. I don't think there's anything built-in into the iPhone SDK.
use this json
[
{
"name": "Alabama",
"abbreviation": "AL"
},
{
"name": "Alaska",
"abbreviation": "AK"
},
{
"name": "American Samoa",
"abbreviation": "AS"
},
{
"name": "Arizona",
"abbreviation": "AZ"
},
{
"name": "Arkansas",
"abbreviation": "AR"
},
{
"name": "California",
"abbreviation": "CA"
},
{
"name": "Colorado",
"abbreviation": "CO"
},
{
"name": "Connecticut",
"abbreviation": "CT"
},
{
"name": "Delaware",
"abbreviation": "DE"
},
{
"name": "District Of Columbia",
"abbreviation": "DC"
},
{
"name": "Federated States Of Micronesia",
"abbreviation": "FM"
},
{
"name": "Florida",
"abbreviation": "FL"
},
{
"name": "Georgia",
"abbreviation": "GA"
},
{
"name": "Guam",
"abbreviation": "GU"
},
{
"name": "Hawaii",
"abbreviation": "HI"
},
{
"name": "Idaho",
"abbreviation": "ID"
},
{
"name": "Illinois",
"abbreviation": "IL"
},
{
"name": "Indiana",
"abbreviation": "IN"
},
{
"name": "Iowa",
"abbreviation": "IA"
},
{
"name": "Kansas",
"abbreviation": "KS"
},
{
"name": "Kentucky",
"abbreviation": "KY"
},
{
"name": "Louisiana",
"abbreviation": "LA"
},
{
"name": "Maine",
"abbreviation": "ME"
},
{
"name": "Marshall Islands",
"abbreviation": "MH"
},
{
"name": "Maryland",
"abbreviation": "MD"
},
{
"name": "Massachusetts",
"abbreviation": "MA"
},
{
"name": "Michigan",
"abbreviation": "MI"
},
{
"name": "Minnesota",
"abbreviation": "MN"
},
{
"name": "Mississippi",
"abbreviation": "MS"
},
{
"name": "Missouri",
"abbreviation": "MO"
},
{
"name": "Montana",
"abbreviation": "MT"
},
{
"name": "Nebraska",
"abbreviation": "NE"
},
{
"name": "Nevada",
"abbreviation": "NV"
},
{
"name": "New Hampshire",
"abbreviation": "NH"
},
{
"name": "New Jersey",
"abbreviation": "NJ"
},
{
"name": "New Mexico",
"abbreviation": "NM"
},
{
"name": "New York",
"abbreviation": "NY"
},
{
"name": "North Carolina",
"abbreviation": "NC"
},
{
"name": "North Dakota",
"abbreviation": "ND"
},
{
"name": "Northern Mariana Islands",
"abbreviation": "MP"
},
{
"name": "Ohio",
"abbreviation": "OH"
},
{
"name": "Oklahoma",
"abbreviation": "OK"
},
{
"name": "Oregon",
"abbreviation": "OR"
},
{
"name": "Palau",
"abbreviation": "PW"
},
{
"name": "Pennsylvania",
"abbreviation": "PA"
},
{
"name": "Puerto Rico",
"abbreviation": "PR"
},
{
"name": "Rhode Island",
"abbreviation": "RI"
},
{
"name": "South Carolina",
"abbreviation": "SC"
},
{
"name": "South Dakota",
"abbreviation": "SD"
},
{
"name": "Tennessee",
"abbreviation": "TN"
},
{
"name": "Texas",
"abbreviation": "TX"
},
{
"name": "Utah",
"abbreviation": "UT"
},
{
"name": "Vermont",
"abbreviation": "VT"
},
{
"name": "Virgin Islands",
"abbreviation": "VI"
},
{
"name": "Virginia",
"abbreviation": "VA"
},
{
"name": "Washington",
"abbreviation": "WA"
},
{
"name": "West Virginia",
"abbreviation": "WV"
},
{
"name": "Wisconsin",
"abbreviation": "WI"
},
{
"name": "Wyoming",
"abbreviation": "WY"
}
]