How to use dynamic page (title page) link in code

Wix Data for dynamic pages automatically creates a database field for the pge link. The field identifier has ‘-’ sign characters in them. For example ‘link-my-page-title’. Now in velo code how do I assign this to a variable.

let g = await wixData . query (‘gallery’). eq ( ‘title’ , name ). find ();
if (g. items . length == 1 ) {
let pageurl = g.items[0].link-galleries-title;

}

The above line will not work since it thinks the - signs is a subtraction symbol. What is the work around?

Found it. It is same as https://www.wix.com/velo/forum/coding-with-velo/set-up-repeater-with-code-and-url-link-to-dynamic-pages.

Use
let pageurl = g.items[0][‘link-galleries-title’];

Well done!