I have the following code in JavaScript
var result = {
'org.apache.struts' : '4567ty5y7u8j89hjk789',
'firstName' : 'Thorpe',
'surName' : 'Obazee'
}
When I try to read result:
// this works
sys.puts(result.firstName) // returns Thorpe
sys.puts(result.surName) // returns Obazee
The problem comes when I read the other property
sys.puts(result.org.apache.struts) // return an error
Error: Expected 'TypeError: Cannot read property 'apache' of undefined
How should I read this so that I can access the information I put?
=symbol to separate the name and value (it should be a:).