I have an object named facility
facility = {
facility_id: 495867,
facility_name: "4 Pig farms Brookvale",
registered_business_name: "BROOKVALE FARMS COMPANY PTY LTD",
postcode: 2100
}
why does facility['facility_name']
and facility.facility_name
both give the string.
yet only facility['registered_business_name']
works
but using facility.registered_business_name
gives undefined?
What is the difference between access methods that causes facility.registered_business_name to return undefined?