Array
1 TopicSharePoint JSON Formatting using split and the resulting array
Hello, at https://learn.microsoft.com/de-de/sharepoint/dev/declarative-customization/formatting-syntax-reference I did find this for the split operator: split: divides the given string into an ordered list of substrings by searching for the given pattern, and returns an array of these substrings "txtContent": "=split('Hello World', ' ')" returns an array with 2 strings - 'Hello' and 'World' This returns: Hello, World Now with that given - I use this: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=split([$Supervisor.email], '@')" } This returns: first.name,domain.com It does what it should. However my question is how can I address the array? So for example that only the index 0 of the array will be returned? Means only: first.name Or index 1 of the array, which would return only: domain.com At the end I need all elements of the array to build a new string I need. I want to create a delve link of the user profile to be opened at a new browser tab. I have all working except the string rebuild of the email. Side note: I have used the replace operator to solve my problem (not mentioned and shown here!) But, I want to learn more and like to know, how to use the split operator and access each operand of the array individually. Somebody knowing it and can explain? Many thanks for teaching me in advance. Cheers JKSolved14KViews0likes2Comments