File/Folder/Path Basic Component in uipath forms output giving error - Object reference not set

My Forms output is this…
{
“givenValueOfOption”: “option1”,\r\n
“submit”: true,
“container”: {
“givenExcelFile”: “C:\\Users\\TEST\\Documents\\UiPath\\Excelfile 1.xlsx”
}
}

When i use Assign to extract file name then i get error - Object reference not set to an instance of an object.
My assign look like this
str_exelFile = jsonOutput(“givenExcelFil”).ToString

the assign I did on givenValueOfOptione is working perfekt and show me the value option1 but file path assing is giving error.

can someone help.

@Latif

Check the spelling as below

“givenExcelFile”: “C:\Users\TEST\Documents\UiPath\Excelfile 1.xlsx”

The key is givenExcelFile

but you have given jsonOutput(“giveExcelFil”).ToString

Check and let me know

Thanks

sorry its typing mistake here… i did copy past in my code and its correct.

@Latif

Can you share your JSON output in a notepad file?

Thanks

this is jsonoutput in write line activity…
{
“givenoption”: “option1”,
“submit”: true,
“container”: {
“givenExcelFile”: “C:\Users\TEST\Documents\UiPath\6-FerieUge\ExcelFile 1.xlsx”
}
}

@Latif

Did you use Deserliaze JSON ?

because it is showing error

Thanks

@Latif

Write to a notepad file, as the JSON format is giving error

Thanks

yes i use deserliaze json and i always use that and its working… but do not know why that not working.

can anyone help on spliting the file path and file name,…

I want this in 2 varibale…

variable1 = C:\Users\TEST\Documents\UiPath\VacWeek
variable2 = ExcelFile 1.xlsx

how can i do that… split is not working on it. :frowning: