# String: Explode to an array

**URL:** <https://forum.alumio.com/t/string-explode-to-an-array/600>\
**Category:** Mappers\
**Tags:** data-transformer\
**Created:** [May 18, 2023, 7:49pm UTC](https://forum.alumio.com/t/string-explode-to-an-array/600 "2023-05-18T19:49:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.ferrell](https://forum.alumio.com/letter_avatar_proxy/v4/letter/s/ed8c4c/32.png) [@steven.ferrell](https://forum.alumio.com/u/steven.ferrell)\
**Post date:** [May 18, 2023, 7:49pm UTC](https://forum.alumio.com/t/string-explode-to-an-array/600/1 "2023-05-18T19:49:38Z")

</div>

Hello,

I have a string that looks like this:

```auto
{
  "sku":"1x130F1002P2/2x023F35/1x044F7248"
}

```

If I use a value mapper of String: Explode with the delimiter I end up with:

```auto
{
  "sku": [
    "1x130F1002P2",
    "2x023F35",
    "1x044F7248"
  ]
}

```

How do I go about getting this to look similar to:

```auto
{
  "sku": [
    {
      sku: "1x130F1002P2"
    },
   {
      sku: "2x023F35"
    },
   {
      sku: "1x044F7248"
    }
  ]
}

```

Cant quite figure out how to get that new sku key in there with the appropriate value.

---

<div class="post-metadata">

**Author:** ![jesse](https://forum.alumio.com/letter_avatar_proxy/v4/letter/j/c77e96/32.png) [@jesse](https://forum.alumio.com/u/jesse)\
**Post date:** [May 22, 2023, 6:22am UTC](https://forum.alumio.com/t/string-explode-to-an-array/600/2 "2023-05-22T06:22:20Z")

</div>

@steven.ferrell I don’t think that’s possible exclusively using mappers. You will need to use the _Move using a pattern_ transformer with the following parameters:  
_Pattern:_ sku.\*  
_Replacement:_ sku.$1.sku

---

<div class="post-metadata">

**Author:** ![steven.ferrell](https://forum.alumio.com/letter_avatar_proxy/v4/letter/s/ed8c4c/32.png) [@steven.ferrell](https://forum.alumio.com/u/steven.ferrell)\
**Post date:** [May 22, 2023, 1:27pm UTC](https://forum.alumio.com/t/string-explode-to-an-array/600/3 "2023-05-22T13:27:59Z")

</div>

ah, excellent idea. Thanks!
