AEM JavaScript Use-API String Multi JSON

JSON content parsing, e.g., jcr:content Type string[] with JSON values.

CRXDE Properties editor showing expanded String[] Multi value JSON
JCR Properties - String[] Multi JSON values

Use-API JavaScript

"use strict";

use(function() {

  let val = [];

  try {
     let myPropStrings = properties.get('myProp') || [];
     val ={
         return JSON.parse(data);
  } catch (e) {
      log.error('Could not read myProp: ' + e.message);

  return val;


HTL Sample

  <sly data-sly-list="${data}">
    <h3 data-label="${item.label}">

Part 3 of 4 in the AEM JavaScript Use-API series.

Part 1 | AEM JavaScript Use-API ResourceUtils | Stubbing Data with AEM JavaScript Use-API

comments powered by Disqus