It looks like you're new here. If you want to get involved, click one of these buttons!
<<set $testobject to {name: "test object", description: "This is an object which I am using to test SugarCube's datamapping abilities.", acquired: "You grab the object, participating against your will in the test.", carried: false, acquired: false}>>
<<if $testobject.acquired == false>> <<click "Test Object">> <<set $testobject.acquired to true>> <<set $testobject.carried to true>> <<set $selectedobject to $testobject>> <<goto "item acquired">> <</click>> <</if>>
<<set $person to {name: "bob", age: 18}>> Your name is: <<print $person.name>> and you are <<print $person.age>> years old.
Comments
You do have an issue, however. In the following line, you're assigning a $testobject reference to $selectedobject: Because of the way the story history works, references are unsafe and will break at some point (specifically, both objects will be cloned and will no longer refer to the same object; each will have its own copy of the original).
Edit: Also. Instead of the following: I'd suggest either: Or: You're not doing anything which requires <<goto>>.