Thanks ChrisAdams for your inputs and followup from other questions of armygrad
If that is the case, and context.expand( '${CustomerDataSource#Book1}' ) can get the value, then just assertion needs to be change from the previous response and no need of If condition as assert will make the test fail automatically.
assert json.Content.'2024-02-27'.'6380'[0].BranchCode == context.expand( '${CustomerDataSource#Book1}' )
By the way, it appears the some of the keys seems to be dynamic such as date and some number, so need to be careful.