-1

how to access each file name...

 {"Appointments":
    [
        {
            "file_name":"eeea4a560492004c5c14f9414e88c32c.jpg", 
            "file_type":"image\/jpeg", 
            "file_path":"C:\/inetpub\/wwwroot\/nautSearch\/server\/uploadedfiles\/files\/", 
            "orig_name":"a46cf6866df6f358bece629ef472ac69.jpg", 
            "file_ext":".jpg", 
            "file_size":418.17, 
            "is_image":true, 
            "image_width":2560, 
            "image_height":1440, 
            "image_type":"jpeg", 
            "image_size_str":"width=\"2560\" height=\"1440\""

        }, 
        {
            "file_name":"c08ff85a44e0f86ab48ec709e6ba1b4a.jpg", 
            "file_type":"image\/jpeg", 
            "file_path":"C:\/inetpub\/wwwroot\/nautSearch\/server\/uploadedfiles\/files\/", 
            "file_ext":".jpg", 
            "file_size":27.38, 
            "is_image":true, 
            "image_width":479, 
            "image_height":403, 
            "image_type":"jpeg", 
            "image_size_str":"width=\"479\" height=\"403\""

        }, 
        {
            "file_name":"4536acd0479c6c5dee3b1f546ed8d328.jpg", 
            "file_type":"image\/jpeg", 
            "file_path":"C:\/inetpub\/wwwroot\/nautSearch\/server\/uploadedfiles\/files\/", 
            "file_ext":".jpg", 
            "file_size":27.38, 
            "is_image":true,
            "image_width":479, 
            "image_height":403, 
            "image_type":"jpeg", 
            "image_size_str":"width=\"479\" height=\"403\""

        }
    ]
}
1
  • Welcome to SO! Please elaborate a bit about what this data structure is. Did you read it from a file? A web service? Is it already parsed into an object or array? What did you try? By access, do you mean retrieving the names of the files or reading the files? Commented Nov 24, 2016 at 8:24

1 Answer 1

0

What you gave is a json string. First you must decode it and loop over the appointments to use the file names:

$result = json_decode($yourJsonString);

foreach ($result->Appointments as $appointment) {
    echo $appointment->file_name;
}
Sign up to request clarification or add additional context in comments.

1 Comment

thanx..it works

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.