Getting original LocationNode from hit tested SCNNode

I would like to modify the content of a published LocationNode upon been clicked by the user. But unfortunately:

func hitTest(_ point: CGPoint, options: [SCNHitTestOption : Any]? = nil) -> [SCNHitTestResult]

returns an SCNNode array from which it is impossible to retrieve the original LocationNode being inserted in order to be able to modify it.

Of course the solution would be to either insert the SCNNode corresponding to the inserted LocationNode in a custom class or conversely insert the identifier of the custom object as a tag of the LocationNode, in order to solve the issue. But both options seem impossible to implement. May anyone help me?

I solved it with function:

func processNodeTouch(node: SCNNode){
for cloudNode in shownCloudAnnotations{
print("message matching \(cloudNode.cloud?.message ?? "no message") \(cloudNode.cloud?.index ?? 0), insideClouds: \(cloudNode.childNodes.count), cloudNode0: \(cloudNode.childNodes[0]), cloudNode: \(cloudNode), node: \(node)")
if cloudNode.childNodes[0] == node || cloudNode==node{
print("index", cloudNode.index ?? "nessun indice")
handleCloudTouching(cloudLocation: cloudNode)
}
}
}
Getting original LocationNode from hit tested SCNNode
 
 
Q