So I created a list, and I can happily use the CEWP to insert Javascript to query the list (with CAML) and return the field values from the list.
Next, I altered the list so thast 1 column is a lookup column.
Specificaly, it's a lookup to select a page from the same site.
Sharepoint did not offer me the Page Name to select from, so I am using 'Title'.
Title is now stored in my list as 'Page_Title'.
Now, going back to my Javascript.
When I get to the field 'Page_Title', instead of a value, I am getting an object.
Ok, so this makes sense, I understand 'why' I am getting an object.
However, I am struggling on how to handle the object to uncover it's properties.
My best hope so far has only produced error :
obj.get_item("Page_Title").obj.get_item("FileLeafRef")
Any pointers ?