Skip to main content
Known Participant
May 23, 2025
Question

Issue splitting value from CSV with split command

  • May 23, 2025
  • 1 reply
  • 132 views

Hey,


I have a csv dataValue "1920x1080" that I want to convert to separate to two integers, one for width and one for height. My thinking is to first split it up with a split command and then convert it to an integer with parseInt.

However, I get "TypeError: Cannot read properties of null (reading 'split')" for the split command.
I am pretty sure the res value of the specified csv field is "1920x1080", and replacing the first line in the code below with "res = "1920x1080" works perfectly.

With the dataValue([13,1]) being "1920x1080", why does this not return "1920" without an error?

res = footage("list.csv").dataValue([13,1]);
res.split("x")[0]

 Thanks!
Mikael

1 reply

Dan Ebberts
Community Expert
Community Expert
May 23, 2025

What does your csv file look like?