Using special characters in Map Functions


If i have special characters in my documents (like @ as part of Xml to JSON conversions), how can i use them in the map functions ?
Lets say emitting something like Trade.TradeDetail.@Id ?


Your question is not related to Couchbase/Views but simply Javascript one
You should be able to use the “array” notation to access attribute, something line object[“attr”]
So using this notation you can do

emit(doc.Trade.Tradetail["@id"], null);