Data segregation and display in different ui text

Hello,

I have one problem please help me to solve that
i have a serial data ex: "Device ID | Device Data" "1|232" and "2|232" and "3|232"
i want to segregate data and place the data into separate ui text outputs.
if device ID=1 Data should store in Text1
if device ID=2 Data should store in Text2

please help me to solve this

I would use a function node splitting your incoming string into two parts using sting.split(“|”) Take a look here somebody had a similar problem: