Re: [MarkLogic Dev General] JavaScript TypeError

2015-12-14 Thread Florent Georges
Hi Ed, It looks like `doc.town` is an object (at least is not `null` not `undefined`) but that it does not have a `replace` property. You should look at what `doc.town` is in the first place, and how you "get" it. Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ On 1

[MarkLogic Dev General] JavaScript TypeError

2015-12-14 Thread Ed Outhwaite
Hi folks, I’m sure there’s a quick answer to this, but I don’t have time to keep trying different things. I have the results of a sparql query where ?town may or may not be populated (optional). If it is, I need to manipulate the results: var town = ""; if (! doc.town) { t