How to use dynamic mapping with javascript client putmapping