Listing category and its posts one by one

$categories = get_categories( array( 'child_of' => 10 ); 
    foreach ( $categories as $category ) {
    $args = array(
        'posts_per_page'   => 5,
        'offset'           => 0,
        'category'         => category ,
        'category_name'    => '',
        'orderby'          => 'date',
        'order'            => 'DESC',
        'include'          => '',
        'exclude'          => '',
        'meta_key'         => '',
        'meta_value'       => '',
        'post_type'        => 'post',
        'post_mime_type'   => '',
        'post_parent'      => '',
        'author'       => '',
        'post_status'      => 'publish',
        'suppress_filters' => true 
    );
    $posts_array = get_posts( $args );

    foreach($posts_array as $post) {
    // do anything you want with $post
    }
}