File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
sdk/formrecognizer/ai-form-recognizer/samples/javascript Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ async function main() {
4747 console . log ( "Contact Names:" ) ;
4848 for ( const contactName of contactNames ) {
4949 if ( contactName . valueType === "object" ) {
50- const firstName = contactName . value ?. [ "FirstName" ] . value || "<no first name>" ;
51- const lastName = contactName . value ?. [ "LastName" ] . value || "<no last name>" ;
50+ const firstName = contactName . value [ "FirstName" ] . value || "<no first name>" ;
51+ const lastName = contactName . value [ "LastName" ] . value || "<no last name>" ;
5252 console . log ( `- ${ firstName } ${ lastName } (${ contactName . confidence } confidence)` ) ;
5353 }
5454 }
@@ -73,7 +73,7 @@ async function main() {
7373 * processing.
7474 */
7575function printSimpleArrayField ( businessCard , fieldName ) {
76- const fieldValues = businessCard . fields [ fieldName ] ? .value ;
76+ const fieldValues = businessCard . fields [ fieldName ] . value ;
7777 if ( Array . isArray ( fieldValues ) ) {
7878 console . log ( `${ fieldName } :` ) ;
7979 for ( const item of fieldValues ) {
You can’t perform that action at this time.
0 commit comments