Hey everyone,
First time posting on here!
I have an API call that requires an address as one of the parameteres. However, the address has to be formatted specifically in all CAPS and can only say the street name, number, and direction (ex. 1234 MAIN ST NW). If it is not written this way, the API call wont return any results…
For context, the app builds report for the real estate industry, and this api call is for getting the local tax assessment info.
So I have the address that is being taken from a search box-geographic places. This works perfectly fine for all of my other APIs, but now I need to be able to extract that specific part of the address as stated above.
Here is the problem I am running into:
I have made two other data data fields labeled “street name” and “street number” which I then use the geographic address to extract from. The problem is that when it extracts the street name, it shows it as Main Street Northwest, but I need it to say “Main St NW” (I can capitalize everything later).
A glimmer of hope is that the geographic address from the search box saves as "1234 Main st NW, Toronto, Ontario, T5T 6T5, Canada. I would just need to remove the city, province, postal code and country from it, and then capitalize all of the letters.
Can anyone provide some insight on how I can go about this?